﻿using Clancy.Interfaces;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Clancy.Data
{
    [TypeConverter(typeof(VideoSourceFilterInfoTypeConverter))]
    public class VideoSourceFilterInfo : BaseDataContainer, IVideoSourceFilterInfo
    {
        public VideoSourceFilterInfo()
        {
        }

        public VideoSourceFilterInfo(string name, string monikerString)
        {
            SetProperty("Name", name);
            SetProperty("MonikerString", monikerString);
        }

        [XmlElement]
        public int Framerate
        {
            get
            {
                return (int)GetProperty("Framerate", 5);
            }

            set
            {
                SetProperty("Framerate", value);
            }
        }

        [XmlElement]
        public string MonikerString
        {
            get
            {
                return (string)GetProperty("MonikerString", string.Empty);
            }

            set
            {
                SetProperty("MonikerString", value);
            }
        }

        [XmlElement]
        public string Name
        {
            get
            {
                return (string)GetProperty("Name", string.Empty);
            }

            set
            {
                SetProperty("Name", value);
            }
        }

        [XmlElement]
        public bool RequiredAdditionalInfoText { get; set; }
    }
}